package com.sky.service.impl;

import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.mapper.SetmealDishMapper;
import com.sky.service.SetmealDishService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SetmealDishServiceImpl implements SetmealDishService {
    @Autowired
    SetmealDishMapper setmealDishMapper;

    @Override
    public List<SetmealDish> findSetmealDishByDishIds(List<Long> ids) {
        return setmealDishMapper.findSetmealDishByDishIds(ids);
    }

    @Override
    public void addSetmealDishes(List<SetmealDish> source) {
        setmealDishMapper.addSetmealDishes(source);
    }

    @Override
    public List<SetmealDish> queryMealDishesBySetmealId(Long id) {
        return setmealDishMapper.queryMealDishesBySetmealId(id);
    }

    @Override
    public void delSetmealDishBySetmealId(Long id) {
        setmealDishMapper.delSetmealDishBySetmealId(id);
    }
}
